package com.lushu.chapitre1.dialogue.nodes
{
	import __AS3__.vec.Vector;
	
	public class SayNode extends AbstractNode
	{	
		
		private var regExpPattern : RegExp = /\\n/g;
		
		public function SayNode()
		{
			type_ = "say";
		}
		
		public override function toXML(level : int = 0) : String
		{
			var tabIndex : String ="";
			for(var j : int = 0; j < level; j++)
			{
				tabIndex+="\t";
			}
			var nodeXML : String = tabIndex+"<say>"+data_+"</say>";
			return nodeXML;
		}
		
		public override function setInformation(value : XML) : void
		{
			data_ = value.toString().replace(regExpPattern, "\n");
		}

	}
}